import { ActCommmonModalComponent } from "./act-common.component";
import { GY1ModalComponent } from "@app/pipeline/shared/工艺类/正常节点/gy1.component";
import { RW2ModalComponent } from "@app/pipeline/shared/任务类/正常节点/rw2.component";
import { ZL1ModalComponent } from "@app/pipeline/shared/质量类/正常节点/zl1.component";
import { ZL11ModalComponent } from "@app/pipeline/shared/质量类/正常节点/zl11.component";
import { YL2ModalComponent } from "@app/pipeline/shared/原材料类/正常节点/yl2.component";
import { YL10ModalComponent } from "@app/pipeline/shared/原材料类/正常节点/yl10.component";
import { GXZXModalComponent } from "@app/pipeline/shared/工序执行类/正常节点/gxzx.component";
import { RW3ModalComponent } from "@app/pipeline/shared/任务类/正常节点/rw3.component";
import { GY21ModalComponent } from "./工艺类/正常节点/gy21.component";
import { YL13ModalComponent } from "./原材料类/正常节点/yl13.component";
import { GY24ModalComponent } from "./工艺类/正常节点/gy24.component";
import { RW21ModalComponent } from "./任务类/正常节点/rw21.component";
import { RW22ModalComponent } from "./任务类/正常节点/rw22.component";
import { RW23ModalComponent } from "./任务类/正常节点/rw23.component";
import { RW24ModalComponent } from "./任务类/正常节点/rw24.component";
import { RW8ModalComponent } from "./任务类/正常节点/rw8.component";
import { RW26ModalComponent } from "./任务类/正常节点/rw26.component";
//import { GY04ModalComponent } from "./工艺类/正常节点/gy04.component";
import { GY05ModalComponent } from "./工艺类/正常节点/gy05.component";
import { GY06ModalComponent } from "./工艺类/正常节点/gy06.component";
import { RW5ModalComponent } from "./任务类/正常节点/rw5.component";
import { RW6ModalComponent } from "./任务类/正常节点/rw6.component";
import { RW7ModalComponent } from "./任务类/正常节点/rw7.component";
import { GY03ModalComponent } from "./工艺类/正常节点/gy03.component";
import { ZL4ModalComponent } from "./质量类/正常节点/zl4.component";
import { ZL5ModalComponent } from "./质量类/正常节点/zl5.component";

export class ComponentConfig {
  private config = {
    GY1: { component: GY1ModalComponent, modalSize: "modal-xl" },
    GY21: { component: GY21ModalComponent, modalSize: "modal-lg" },
    GY13: { component: GY03ModalComponent, modalSize: 'modal-xl' },
    GY05: { component: GY05ModalComponent, modalSize: "modal-xl" },
    GY06: { component: GY06ModalComponent, modalSize: "modal-xl" },

    RW2: { component: RW2ModalComponent, modalSize: "modal-lg" },
    RW3: { component: RW3ModalComponent, modalSize: "modal-lg" },
    RW8: { component: RW8ModalComponent, modalSize: '' },
    RW12: { component: RW5ModalComponent, modalSize: '' },
    RW16: { component: RW6ModalComponent, modalSize: '' },
    RW17: { component: RW7ModalComponent, modalSize: '' },
    RW21: { component: RW21ModalComponent, modalSize: "modal-lg" },
    RW22: { component: RW22ModalComponent, modalSize: "modal-lg" },
    RW23: { component: RW23ModalComponent, modalSize: "" },
    RW24: { component: RW24ModalComponent, modalSize: "" },
    //RW4: { component: RW8ModalComponent, modalSize: "" },
    RW26: { component: RW26ModalComponent, modalSize: "" },

    ZL1: { component: ZL1ModalComponent, modalSize: "modal-lg" },
    ZL4: { component: ZL4ModalComponent, modalSize: '' },
    ZL5: { component: ZL5ModalComponent, modalSize: '' },
    ZL11: { component: ZL11ModalComponent, modalSize: "modal-lg" },
   
    YL2: { component: YL2ModalComponent, modalSize: "modal-xxl" },
    YL10: { component: YL10ModalComponent, modalSize: "modal-xxl" },
    YL13: { component: YL13ModalComponent, modalSize: "modal-xl" },
    GXZX: { component: GXZXModalComponent, modalSize: "modal-xxl" },
    
  };

  getComponentByName(name: string) {
    name = name.toUpperCase();
    if (name.startsWith("GXZX")) {
      name = "GXZX";
    }
    if (this.config.hasOwnProperty(name)) {
      return this.config[name];
    } else {
      return { component: ActCommmonModalComponent, modalSize: "modal-lg" };
    }
  }
}
